<template>
  <div class="method">
    <el-collapse v-model="activeNames" @change="handleChange">
      <method-item v-for="(item, index) in list" :item="item" :name="index" :key="index" :activeNames="activeNames"
        @deleteApi="deleteApi"></method-item>
    </el-collapse>
  </div>
</template>

<script>
import methodItem from "@/views/modules/mspbots/public-api/method-item";
export default {
  name: "api-method",
  components: {
    methodItem
  },
  props: ['list'],
  data () {
    return {
      activeNames: ['1'],
      // list: [
      //   {type: 'delete'},
      //   {type: 'get'},
      //   {type: 'post'},
      //   {type: 'put'},
      //   {type: 'patch'},
      // ]
    };
  },
  methods: {
    handleChange (val) {
    },
    deleteApi (item) {
      this.$emit('deleteApi', item)
    }
  }
}
</script>

<style scoped>

</style>
